<?php
/**
 * @Name: RoleNodeRequest.php
 * @Author: yashuai<1762910894@qq.com>
 * @Desc: 角色关联菜单
 */

namespace App\Http\Requests\Rbac;

use App\Http\Requests\PackingRequest;

class RoleNodeRequest extends PackingRequest
{

    public function rules()
    {
        return [
            'RoleID'   => 'required|integer',
            'NodeID'   => 'required|array',
            'NodeID.*' => 'integer',
        ];
    }

    public function messages()
    {
        return [
            'RoleID.required' => '缺少记录ID参数',
            'RoleID.integer'  => '记录ID参数类型异常',
            'NodeID.required' => '菜单节点数据不能为空',
            'NodeID.array'    => '菜单节点数据类型异常',
            // todo 星号自定义有问题
            'NodeID.*'        => '菜单节点数据类型异常',
        ];
    }

}
